<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Схема разработана Управлением актуализации и модернизации руководств по структурированным электронным медицинским документам (СЭМД) 2024 -->
<!-- Включены элементы разработанные Health Level Seven -->
<xsd:schema targetNamespace="urn:hl7-org:v3" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:hl7-org:v3" xmlns:mif="urn:hl7-org:v3/mif" elementFormDefault="qualified">
	<!--
*****************************************************************************************************************
* XML schema for message type POCD_MT000040.
* Generated by XMLITS version 2.0
*
* Copyright (c) 2002, 2003, 2004, 2005 Health Level Seven. All rights reserved.
*  Redistribution and use in source and binary forms, with or without
*  modification, are permitted provided that the following conditions
*  are met:
*  1. Redistributions of source code must retain the above copyright
*     notice, this list of conditions and the following disclaimer.
*  2. Redistributions in binary form must reproduce the above copyright
*     notice, this list of conditions and the following disclaimer in the
*     documentation and/or other materials provided with the distribution.
*  3. All advertising materials mentioning features or use of this software
*     must display the following acknowledgement:
*       This product includes software developed by Health Level Seven.
*  THIS SOFTWARE IS PROVIDED BY HEALTH LEVEL SEVEN, INC. AND CONTRIBUTORS "AS IS" AND
*  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
*  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
*  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
*  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
*  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
*  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
*  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
*  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
*  SUCH DAMAGE.
*
********************************************************************************************************************
	  -->
	<xsd:include schemaLocation="AUTHOR.xsd"/>
	<xsd:include schemaLocation="RECORD_TARGET.xsd"/>
	<xsd:include schemaLocation="CUSTODIAN.xsd"/>
	<xsd:include schemaLocation="INFORMATION_RECIPIENT.xsd"/>
	<xsd:include schemaLocation="DOCUMENTATION_OF.xsd"/>
	<xsd:include schemaLocation="PARTICIPANT.xsd"/>
	<xsd:include schemaLocation="STRUCTURED_BODY.xsd"/>
	<xsd:element name="ClinicalDocument" type="POCD_MT000040.ClinicalDocument"/>
	<xsd:complexType name="POCD_MT000040.ClinicalDocument">
		<xsd:sequence>
			<!-- Элемент "Указание на область применения документа (РФ)" -->
			<xsd:element name="realmCode" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>область применения документа (страна)</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="code" type="cs" use="required" fixed="RU"/>
					<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Указание на тип структуры документа (CDA R2)" -->
			<xsd:element name="typeId" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>указатель на использование CDA R2</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="II">
							<xsd:attribute name="root" type="uid" use="required" fixed="2.16.840.1.113883.1.3"/>
							<xsd:attribute name="extension" type="st" use="required" fixed="POCD_MT000040"/>
							<xsd:attribute name="assigningAuthorityName" type="st" use="prohibited"/>
							<xsd:attribute name="displayable" type="bl" use="prohibited"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Уникальный идентификатор руководства по реализации СЭМД" -->
			<xsd:element name="templateId" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>уникальный идентификатор руководства по реализации</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="II">
							<xsd:attribute name="root" type="uid" use="required" fixed="1.2.643.5.1.13.13.15.111.1"/>
							<xsd:attribute name="extension" type="st" use="prohibited"/>
							<xsd:attribute name="assigningAuthorityName" type="st" use="prohibited"/>
							<xsd:attribute name="displayable" type="bl" use="prohibited"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Уникальный идентификатор документа" -->
			<xsd:element name="id" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>уникальный идентификатор документа</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="II">
							<xsd:attribute name="root" use="required">
								<xsd:simpleType>
									<xsd:restriction base="uid">
											<xsd:pattern value="[0-2](\.(0|[1-9][0-9]*))*.51"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:attribute>
							<xsd:attribute name="extension" type="st" use="required"/>
							<xsd:attribute name="assigningAuthorityName" type="st" use="prohibited"/>
							<xsd:attribute name="displayable" type="bl" use="prohibited"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Вид медицинского документа" -->
			<xsd:element name="code" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>тип документа</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element minOccurs="1" maxOccurs="1" name="translation">
							<xsd:complexType>
								<xsd:attribute name="code" type="cs" use="required" fixed="111"/>
								<xsd:attribute name="codeSystem" type="uid" use="required" fixed="1.2.643.5.1.13.13.99.2.1079"/>
								<xsd:attribute name="codeSystemName" type="st" use="required"/>
								<xsd:attribute name="codeSystemVersion" type="st" use="required"/>
								<xsd:attribute name="displayName" type="st" use="required"/>
								<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
					<xsd:attribute name="code" use="required">
						<xsd:simpleType>
							<xsd:restriction base="cs">
								<xsd:enumeration value="230" />
								<xsd:enumeration value="502" />
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
					<xsd:attribute name="codeSystem" use="required" >
						<xsd:simpleType>
							<xsd:restriction base="uid">
								<xsd:enumeration value="1.2.643.5.1.13.13.11.1520" />
								<xsd:enumeration value="1.2.643.5.1.13.13.11.1522" />
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:attribute>
					<xsd:attribute name="codeSystemName" type="st" use="required"/>
					<xsd:attribute name="codeSystemVersion" type="st" use="required"/>
					<xsd:attribute name="displayName" type="st" use="required"/>
					<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>		
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Заголовок документа" -->
			<xsd:element name="title" type="st" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>заголовок документа</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<!-- Элемент "Дата создания документа" -->
			<xsd:element name="effectiveTime" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>дата создания документа</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="TS">
							<xsd:attribute name="value" use="optional" type="ts"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="optional"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Уровень конфиденциальности документа" -->
			<xsd:element name="confidentialityCode" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>уровень конфиденциальности документа</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="CE_non_elements">
							<xsd:attribute name="code" type="cs" use="required"/>
							<xsd:attribute name="codeSystem" type="uid" use="required" fixed="1.2.643.5.1.13.13.99.2.285"/>
							<xsd:attribute name="codeSystemName" type="st" use="required"/>
							<xsd:attribute name="codeSystemVersion" type="st" use="required"/>
							<xsd:attribute name="displayName" type="st" use="required"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Указание на язык документа" -->
			<xsd:element name="languageCode" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>язык документа</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:attribute name="code" type="cs" use="required" fixed="ru-RU"/>							
					<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Уникальный идентификатор набора версий документа" -->
			<xsd:element name="setId" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>уникальный идентификатор набора версий документа</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="II">
							<xsd:attribute name="root" use="required">
								<xsd:simpleType>
									<xsd:restriction base="uid">
										<xsd:pattern value="[0-2](\.(0|[1-9][0-9]*))*.50"/>
									</xsd:restriction>
								</xsd:simpleType>
							</xsd:attribute>
							<xsd:attribute name="extension" type="st" use="required"/>
							<xsd:attribute name="assigningAuthorityName" type="st" use="prohibited"/>
							<xsd:attribute name="displayable" type="bl" use="prohibited"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<!-- Элемент "Номер версии документа" -->
			<xsd:element name="versionNumber" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>номер версии данного документа</xsd:documentation>
				</xsd:annotation>
				<xsd:complexType>
					<xsd:complexContent>
						<xsd:restriction base="INT">
							<xsd:attribute name="value" use="required" type="int"/>
							<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
						</xsd:restriction>
					</xsd:complexContent>
				</xsd:complexType>
			</xsd:element>
			<!-- Блок "Сведения о пациенте" -->
			<xsd:element name="recordTarget" type="POCD_MT000040.RecordTarget" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>данные о пациенте</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<!-- Блок "Сведения об авторе документа" -->
			<xsd:element name="author" type="POCD_MT000040.Author" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>данные об авторе документа</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<!-- Блок "Сведения о владельце документа" -->
			<xsd:element name="custodian" type="POCD_MT000040.Custodian" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>данные об организации-владельце документа</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<!-- Блок "Сведения о получателе документа" -->
			<xsd:element name="informationRecipient" type="POCD_MT000040.InformationRecipient" minOccurs="2" maxOccurs="unbounded">
				<xsd:annotation>
					<xsd:documentation>данные о получателе документа</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<!-- Блоки "Сведения об источнике оплаты" -->
			<xsd:element name="participant" type="POCD_MT000040.Participant1_IND" minOccurs="0" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>сведения об источнике оплаты</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<!-- Блок "Сведения о документируемом событии" -->
			<xsd:element name="documentationOf" type="POCD_MT000040.DocumentationOf" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>сведения о документируемом событии</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<!-- Блок "Тело документа" -->
			<xsd:element name="component" type="POCD_MT000040.Component2" minOccurs="1" maxOccurs="1">
				<xsd:annotation>
					<xsd:documentation>тело документа</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
	</xsd:complexType>
</xsd:schema>
